#!/bin/bash - 
#===============================================================================
#          FILE:  build.sh
#         USAGE:  ./build.sh  [clean]
# 
#   DESCRIPTION:  
# 
#      REVISION: 1.0
#       CREATED: 01/26/2014 19:00:12 PM CST
#        AUTHOR: Theophilus, wangtf418@gmail.com
#===============================================================================
set -o nounset                              # Treat unset variables as an error

export SRVFRAME_ROOT=`pwd`

cd ../baseframe/
export BASEFRAME_ROOT=`pwd`
cd ${SRVFRAME_ROOT}

if [ $# == 0 ];then
	cd src;
	make;
	make -f makefile.object;
	make install;
elif [ $# == 1 ];then
	if [ $1 == 'clean' ];then
		rm -f lib/* obj/* include/*
	else
		echo "$0 or $0 clean"
	fi
fi

